<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkActivatable: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="DeprecatedObjects.html" title="Deprecated">
<link rel="prev" href="GtkRecentAction.html" title="GtkRecentAction">
<link rel="next" href="GtkImageMenuItem.html" title="GtkImageMenuItem">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkActivatable.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkActivatable.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites">  <span class="dim">|</span> 
                  <a href="#GtkActivatable.prerequisites" class="shortcut">Prerequisites</a></span><span id="nav_implementations">  <span class="dim">|</span> 
                  <a href="#GtkActivatable.implementations" class="shortcut">Known Implementations</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GtkActivatable.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="DeprecatedObjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkRecentAction.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkImageMenuItem.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkActivatable"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkActivatable.top_of_page"></a>GtkActivatable</span></h2>
<p>GtkActivatable — An interface for activatable widgets</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkActivatable.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkActivatable.html#gtk-activatable-do-set-related-action" title="gtk_activatable_do_set_related_action ()">gtk_activatable_do_set_related_action</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkActivatable.html#gtk-activatable-get-related-action" title="gtk_activatable_get_related_action ()">gtk_activatable_get_related_action</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkActivatable.html#gtk-activatable-get-use-action-appearance" title="gtk_activatable_get_use_action_appearance ()">gtk_activatable_get_use_action_appearance</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkActivatable.html#gtk-activatable-sync-action-properties" title="gtk_activatable_sync_action_properties ()">gtk_activatable_sync_action_properties</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkActivatable.html#gtk-activatable-set-related-action" title="gtk_activatable_set_related_action ()">gtk_activatable_set_related_action</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkActivatable.html#gtk-activatable-set-use-action-appearance" title="gtk_activatable_set_use_action_appearance ()">gtk_activatable_set_use_action_appearance</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkActivatable.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> *</td>
<td class="property_name"><a class="link" href="GtkActivatable.html#GtkActivatable--related-action" title="The “related-action” property">related-action</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GtkActivatable.html#GtkActivatable--use-action-appearance" title="The “use-action-appearance” property">use-action-appearance</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkActivatable.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GtkActivatable.html#GtkActivatable-struct" title="GtkActivatable">GtkActivatable</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkActivatable.html#GtkActivatableIface" title="struct GtkActivatableIface">GtkActivatableIface</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkActivatable.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
    <span class="lineart">╰──</span> GtkActivatable
</pre>
</div>
<div class="refsect1">
<a name="GtkActivatable.prerequisites"></a><h2>Prerequisites</h2>
<p>
GtkActivatable requires
 GObject.</p>
</div>
<div class="refsect1">
<a name="GtkActivatable.implementations"></a><h2>Known Implementations</h2>
<p>
GtkActivatable is implemented by
 <a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a>,  <a class="link" href="GtkCheckButton.html" title="GtkCheckButton">GtkCheckButton</a>,  <a class="link" href="GtkCheckMenuItem.html" title="GtkCheckMenuItem">GtkCheckMenuItem</a>,  <a class="link" href="GtkColorButton.html" title="GtkColorButton">GtkColorButton</a>,  <a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a>,  <a class="link" href="GtkImageMenuItem.html" title="GtkImageMenuItem">GtkImageMenuItem</a>,  <a class="link" href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a>,  <a class="link" href="GtkLockButton.html" title="GtkLockButton">GtkLockButton</a>,  <a class="link" href="GtkMenuButton.html" title="GtkMenuButton">GtkMenuButton</a>,  <a class="link" href="GtkMenuItem.html" title="GtkMenuItem">GtkMenuItem</a>,  <a class="link" href="GtkMenuToolButton.html" title="GtkMenuToolButton">GtkMenuToolButton</a>,  <a class="link" href="GtkModelButton.html" title="GtkModelButton">GtkModelButton</a>,  <a class="link" href="GtkRadioButton.html" title="GtkRadioButton">GtkRadioButton</a>,  <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a>,  <a class="link" href="GtkRadioToolButton.html" title="GtkRadioToolButton">GtkRadioToolButton</a>,  <a class="link" href="GtkRecentChooserMenu.html" title="GtkRecentChooserMenu">GtkRecentChooserMenu</a>,  <a class="link" href="GtkScaleButton.html" title="GtkScaleButton">GtkScaleButton</a>,  <a class="link" href="GtkSeparatorMenuItem.html" title="GtkSeparatorMenuItem">GtkSeparatorMenuItem</a>,  <a class="link" href="GtkSeparatorToolItem.html" title="GtkSeparatorToolItem">GtkSeparatorToolItem</a>,  <a class="link" href="GtkSwitch.html" title="GtkSwitch">GtkSwitch</a>,  <a class="link" href="GtkTearoffMenuItem.html" title="GtkTearoffMenuItem">GtkTearoffMenuItem</a>,  <a class="link" href="GtkToggleButton.html" title="GtkToggleButton">GtkToggleButton</a>,  <a class="link" href="GtkToggleToolButton.html" title="GtkToggleToolButton">GtkToggleToolButton</a>,  <a class="link" href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a>,  <a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> and  <a class="link" href="GtkVolumeButton.html" title="GtkVolumeButton">GtkVolumeButton</a>.</p>
</div>
<div class="refsect1">
<a name="GtkActivatable.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkActivatable.description"></a><h2>Description</h2>
<p>Activatable widgets can be connected to a <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> and reflects
the state of its action. A <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> can also provide feedback
through its action, as they are responsible for activating their
related actions.</p>
<div class="refsect2">
<a name="id-1.3.25.31.10.3"></a><h3>Implementing GtkActivatable</h3>
<p>When extending a class that is already <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a>; it is only
necessary to implement the <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a>-&gt;<code class="function">sync_action_properties()</code>
and <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a>-&gt;<code class="function">update()</code> methods and chain up to the parent
implementation, however when introducing
a new <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> class; the <a class="link" href="GtkActivatable.html#GtkActivatable--related-action" title="The “related-action” property"><span class="type">“related-action”</span></a> and
<a class="link" href="GtkActivatable.html#GtkActivatable--use-action-appearance" title="The “use-action-appearance” property"><span class="type">“use-action-appearance”</span></a> properties need to be handled by
the implementor. Handling these properties is mostly a matter of installing
the action pointer and boolean flag on your instance, and calling
<a class="link" href="GtkActivatable.html#gtk-activatable-do-set-related-action" title="gtk_activatable_do_set_related_action ()"><code class="function">gtk_activatable_do_set_related_action()</code></a> and
<a class="link" href="GtkActivatable.html#gtk-activatable-sync-action-properties" title="gtk_activatable_sync_action_properties ()"><code class="function">gtk_activatable_sync_action_properties()</code></a> at the appropriate times.</p>
<div class="refsect3">
<a name="id-1.3.25.31.10.3.3"></a><h4>A class fragment implementing <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a>
</h4>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="k">enum</span> <span class="p">{</span>
<span class="p">...</span>

<span class="n">PROP_ACTIVATABLE_RELATED_ACTION</span><span class="p">,</span>
<span class="n">PROP_ACTIVATABLE_USE_ACTION_APPEARANCE</span>
<span class="p">}</span>

<span class="k">struct</span> <span class="nc">_FooBarPrivate</span>
<span class="p">{</span>

  <span class="p">...</span>

  <span class="n">GtkAction</span>      <span class="o">*</span><span class="n">action</span><span class="p">;</span>
  <span class="n">gboolean</span>        <span class="n">use_action_appearance</span><span class="p">;</span>
<span class="p">};</span>

<span class="p">...</span>

<span class="k">static</span> <span class="kt">void</span> <span class="n">foo_bar_activatable_interface_init</span>         <span class="p">(</span><span class="n">GtkActivatableIface</span>  <span class="o">*</span><span class="n">iface</span><span class="p">);</span>
<span class="k">static</span> <span class="kt">void</span> <span class="n">foo_bar_activatable_update</span>                 <span class="p">(</span><span class="n">GtkActivatable</span>       <span class="o">*</span><span class="n">activatable</span><span class="p">,</span>
						           <span class="n">GtkAction</span>            <span class="o">*</span><span class="n">action</span><span class="p">,</span>
						           <span class="k">const</span> <span class="n">gchar</span>          <span class="o">*</span><span class="n">property_name</span><span class="p">);</span>
<span class="k">static</span> <span class="kt">void</span> <span class="n">foo_bar_activatable_sync_action_properties</span> <span class="p">(</span><span class="n">GtkActivatable</span>       <span class="o">*</span><span class="n">activatable</span><span class="p">,</span>
						           <span class="n">GtkAction</span>            <span class="o">*</span><span class="n">action</span><span class="p">);</span>
<span class="p">...</span>


<span class="k">static</span> <span class="kt">void</span>
<span class="n">foo_bar_class_init</span> <span class="p">(</span><span class="n">FooBarClass</span> <span class="o">*</span><span class="n">klass</span><span class="p">)</span>
<span class="p">{</span>

  <span class="p">...</span>

  <span class="n">g_object_class_override_property</span> <span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> <span class="n">PROP_ACTIVATABLE_RELATED_ACTION</span><span class="p">,</span> <span class="s">&quot;related-action&quot;</span><span class="p">);</span>
  <span class="n">g_object_class_override_property</span> <span class="p">(</span><span class="n">gobject_class</span><span class="p">,</span> <span class="n">PROP_ACTIVATABLE_USE_ACTION_APPEARANCE</span><span class="p">,</span> <span class="s">&quot;use-action-appearance&quot;</span><span class="p">);</span>

  <span class="p">...</span>
<span class="p">}</span>


<span class="k">static</span> <span class="kt">void</span>
<span class="n">foo_bar_activatable_interface_init</span> <span class="p">(</span><span class="n">GtkActivatableIface</span>  <span class="o">*</span><span class="n">iface</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">iface</span><span class="o">-&gt;</span><span class="n">update</span> <span class="o">=</span> <span class="n">foo_bar_activatable_update</span><span class="p">;</span>
  <span class="n">iface</span><span class="o">-&gt;</span><span class="n">sync_action_properties</span> <span class="o">=</span> <span class="n">foo_bar_activatable_sync_action_properties</span><span class="p">;</span>
<span class="p">}</span>

<span class="p">...</span> <span class="n">Break</span> <span class="n">the</span> <span class="n">reference</span> <span class="n">using</span> <span class="n">gtk_activatable_do_set_related_action</span><span class="p">()...</span>

<span class="k">static</span> <span class="kt">void</span> 
<span class="n">foo_bar_dispose</span> <span class="p">(</span><span class="n">GObject</span> <span class="o">*</span><span class="n">object</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">FooBar</span> <span class="o">*</span><span class="n">bar</span> <span class="o">=</span> <span class="n">FOO_BAR</span> <span class="p">(</span><span class="n">object</span><span class="p">);</span>
  <span class="n">FooBarPrivate</span> <span class="o">*</span><span class="n">priv</span> <span class="o">=</span> <span class="n">FOO_BAR_GET_PRIVATE</span> <span class="p">(</span><span class="n">bar</span><span class="p">);</span>

  <span class="p">...</span>

  <span class="k">if</span> <span class="p">(</span><span class="n">priv</span><span class="o">-&gt;</span><span class="n">action</span><span class="p">)</span>
    <span class="p">{</span>
      <span class="n">gtk_activatable_do_set_related_action</span> <span class="p">(</span><span class="n">GTK_ACTIVATABLE</span> <span class="p">(</span><span class="n">bar</span><span class="p">),</span> <span class="nb">NULL</span><span class="p">);</span>
      <span class="n">priv</span><span class="o">-&gt;</span><span class="n">action</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
    <span class="p">}</span>
  <span class="n">G_OBJECT_CLASS</span> <span class="p">(</span><span class="n">foo_bar_parent_class</span><span class="p">)</span><span class="o">-&gt;</span><span class="n">dispose</span> <span class="p">(</span><span class="n">object</span><span class="p">);</span>
<span class="p">}</span>

<span class="p">...</span> <span class="n">Handle</span> <span class="n">the</span> <span class="err">“</span><span class="n">related</span><span class="o">-</span><span class="n">action</span><span class="err">”</span> <span class="n">and</span> <span class="err">“</span><span class="n">use</span><span class="o">-</span><span class="n">action</span><span class="o">-</span><span class="n">appearance</span><span class="err">”</span> <span class="n">properties</span> <span class="p">...</span>

<span class="k">static</span> <span class="kt">void</span>
<span class="n">foo_bar_set_property</span> <span class="p">(</span><span class="n">GObject</span>         <span class="o">*</span><span class="n">object</span><span class="p">,</span>
                      <span class="n">guint</span>            <span class="n">prop_id</span><span class="p">,</span>
                      <span class="k">const</span> <span class="n">GValue</span>    <span class="o">*</span><span class="n">value</span><span class="p">,</span>
                      <span class="n">GParamSpec</span>      <span class="o">*</span><span class="n">pspec</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">FooBar</span> <span class="o">*</span><span class="n">bar</span> <span class="o">=</span> <span class="n">FOO_BAR</span> <span class="p">(</span><span class="n">object</span><span class="p">);</span>
  <span class="n">FooBarPrivate</span> <span class="o">*</span><span class="n">priv</span> <span class="o">=</span> <span class="n">FOO_BAR_GET_PRIVATE</span> <span class="p">(</span><span class="n">bar</span><span class="p">);</span>

  <span class="k">switch</span> <span class="p">(</span><span class="n">prop_id</span><span class="p">)</span>
    <span class="p">{</span>

      <span class="p">...</span>

    <span class="k">case</span> <span class="nl">PROP_ACTIVATABLE_RELATED_ACTION</span><span class="p">:</span>
      <span class="n">foo_bar_set_related_action</span> <span class="p">(</span><span class="n">bar</span><span class="p">,</span> <span class="n">g_value_get_object</span> <span class="p">(</span><span class="n">value</span><span class="p">));</span>
      <span class="k">break</span><span class="p">;</span>
    <span class="k">case</span> <span class="nl">PROP_ACTIVATABLE_USE_ACTION_APPEARANCE</span><span class="p">:</span>
      <span class="n">foo_bar_set_use_action_appearance</span> <span class="p">(</span><span class="n">bar</span><span class="p">,</span> <span class="n">g_value_get_boolean</span> <span class="p">(</span><span class="n">value</span><span class="p">));</span>
      <span class="k">break</span><span class="p">;</span>
    <span class="k">default</span><span class="o">:</span>
      <span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span> <span class="p">(</span><span class="n">object</span><span class="p">,</span> <span class="n">prop_id</span><span class="p">,</span> <span class="n">pspec</span><span class="p">);</span>
      <span class="k">break</span><span class="p">;</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="k">static</span> <span class="kt">void</span>
<span class="n">foo_bar_get_property</span> <span class="p">(</span><span class="n">GObject</span>         <span class="o">*</span><span class="n">object</span><span class="p">,</span>
                         <span class="n">guint</span>            <span class="n">prop_id</span><span class="p">,</span>
                         <span class="n">GValue</span>          <span class="o">*</span><span class="n">value</span><span class="p">,</span>
                         <span class="n">GParamSpec</span>      <span class="o">*</span><span class="n">pspec</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">FooBar</span> <span class="o">*</span><span class="n">bar</span> <span class="o">=</span> <span class="n">FOO_BAR</span> <span class="p">(</span><span class="n">object</span><span class="p">);</span>
  <span class="n">FooBarPrivate</span> <span class="o">*</span><span class="n">priv</span> <span class="o">=</span> <span class="n">FOO_BAR_GET_PRIVATE</span> <span class="p">(</span><span class="n">bar</span><span class="p">);</span>

  <span class="k">switch</span> <span class="p">(</span><span class="n">prop_id</span><span class="p">)</span>
    <span class="p">{</span> 

      <span class="p">...</span>

    <span class="k">case</span> <span class="nl">PROP_ACTIVATABLE_RELATED_ACTION</span><span class="p">:</span>
      <span class="n">g_value_set_object</span> <span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">priv</span><span class="o">-&gt;</span><span class="n">action</span><span class="p">);</span>
      <span class="k">break</span><span class="p">;</span>
    <span class="k">case</span> <span class="nl">PROP_ACTIVATABLE_USE_ACTION_APPEARANCE</span><span class="p">:</span>
      <span class="n">g_value_set_boolean</span> <span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">priv</span><span class="o">-&gt;</span><span class="n">use_action_appearance</span><span class="p">);</span>
      <span class="k">break</span><span class="p">;</span>
    <span class="k">default</span><span class="o">:</span>
      <span class="n">G_OBJECT_WARN_INVALID_PROPERTY_ID</span> <span class="p">(</span><span class="n">object</span><span class="p">,</span> <span class="n">prop_id</span><span class="p">,</span> <span class="n">pspec</span><span class="p">);</span>
      <span class="k">break</span><span class="p">;</span>
    <span class="p">}</span>
<span class="p">}</span>


<span class="k">static</span> <span class="kt">void</span>
<span class="n">foo_bar_set_use_action_appearance</span> <span class="p">(</span><span class="n">FooBar</span>   <span class="o">*</span><span class="n">bar</span><span class="p">,</span> 
				   <span class="n">gboolean</span>  <span class="n">use_appearance</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">FooBarPrivate</span> <span class="o">*</span><span class="n">priv</span> <span class="o">=</span> <span class="n">FOO_BAR_GET_PRIVATE</span> <span class="p">(</span><span class="n">bar</span><span class="p">);</span>

  <span class="k">if</span> <span class="p">(</span><span class="n">priv</span><span class="o">-&gt;</span><span class="n">use_action_appearance</span> <span class="o">!=</span> <span class="n">use_appearance</span><span class="p">)</span>
    <span class="p">{</span>
      <span class="n">priv</span><span class="o">-&gt;</span><span class="n">use_action_appearance</span> <span class="o">=</span> <span class="n">use_appearance</span><span class="p">;</span>
      
      <span class="n">gtk_activatable_sync_action_properties</span> <span class="p">(</span><span class="n">GTK_ACTIVATABLE</span> <span class="p">(</span><span class="n">bar</span><span class="p">),</span> <span class="n">priv</span><span class="o">-&gt;</span><span class="n">action</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="p">...</span> <span class="n">call</span> <span class="n">gtk_activatable_do_set_related_action</span><span class="p">()</span> <span class="n">and</span> <span class="n">then</span> <span class="n">assign</span> <span class="n">the</span> <span class="n">action</span> <span class="n">pointer</span><span class="p">,</span> 
<span class="n">no</span> <span class="n">need</span> <span class="n">to</span> <span class="n">reference</span> <span class="n">the</span> <span class="n">action</span> <span class="n">here</span> <span class="n">since</span> <span class="n">gtk_activatable_do_set_related_action</span><span class="p">()</span> <span class="n">already</span> 
<span class="n">holds</span> <span class="n">a</span> <span class="n">reference</span> <span class="n">here</span> <span class="k">for</span> <span class="n">you</span><span class="p">...</span>
<span class="k">static</span> <span class="kt">void</span>
<span class="n">foo_bar_set_related_action</span> <span class="p">(</span><span class="n">FooBar</span>    <span class="o">*</span><span class="n">bar</span><span class="p">,</span> 
			    <span class="n">GtkAction</span> <span class="o">*</span><span class="n">action</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">FooBarPrivate</span> <span class="o">*</span><span class="n">priv</span> <span class="o">=</span> <span class="n">FOO_BAR_GET_PRIVATE</span> <span class="p">(</span><span class="n">bar</span><span class="p">);</span>

  <span class="k">if</span> <span class="p">(</span><span class="n">priv</span><span class="o">-&gt;</span><span class="n">action</span> <span class="o">==</span> <span class="n">action</span><span class="p">)</span>
    <span class="k">return</span><span class="p">;</span>

  <span class="n">gtk_activatable_do_set_related_action</span> <span class="p">(</span><span class="n">GTK_ACTIVATABLE</span> <span class="p">(</span><span class="n">bar</span><span class="p">),</span> <span class="n">action</span><span class="p">);</span>

  <span class="n">priv</span><span class="o">-&gt;</span><span class="n">action</span> <span class="o">=</span> <span class="n">action</span><span class="p">;</span>
<span class="p">}</span>

<span class="p">...</span> <span class="n">Selectively</span> <span class="n">reset</span> <span class="n">and</span> <span class="n">update</span> <span class="n">activatable</span> <span class="n">depending</span> <span class="n">on</span> <span class="n">the</span> <span class="n">use</span><span class="o">-</span><span class="n">action</span><span class="o">-</span><span class="n">appearance</span> <span class="n">property</span> <span class="p">...</span>
<span class="k">static</span> <span class="kt">void</span>
<span class="n">gtk_button_activatable_sync_action_properties</span> <span class="p">(</span><span class="n">GtkActivatable</span>       <span class="o">*</span><span class="n">activatable</span><span class="p">,</span>
		                                  <span class="n">GtkAction</span>            <span class="o">*</span><span class="n">action</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">GtkButtonPrivate</span> <span class="o">*</span><span class="n">priv</span> <span class="o">=</span> <span class="n">GTK_BUTTON_GET_PRIVATE</span> <span class="p">(</span><span class="n">activatable</span><span class="p">);</span>

  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">action</span><span class="p">)</span>
    <span class="k">return</span><span class="p">;</span>

  <span class="k">if</span> <span class="p">(</span><span class="n">gtk_action_is_visible</span> <span class="p">(</span><span class="n">action</span><span class="p">))</span>
    <span class="n">gtk_widget_show</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">activatable</span><span class="p">));</span>
  <span class="k">else</span>
    <span class="nf">gtk_widget_hide</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">activatable</span><span class="p">));</span>
  
  <span class="n">gtk_widget_set_sensitive</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">activatable</span><span class="p">),</span> <span class="n">gtk_action_is_sensitive</span> <span class="p">(</span><span class="n">action</span><span class="p">));</span>

  <span class="p">...</span>
  
  <span class="k">if</span> <span class="p">(</span><span class="n">priv</span><span class="o">-&gt;</span><span class="n">use_action_appearance</span><span class="p">)</span>
    <span class="p">{</span>
      <span class="k">if</span> <span class="p">(</span><span class="n">gtk_action_get_stock_id</span> <span class="p">(</span><span class="n">action</span><span class="p">))</span>
	<span class="n">foo_bar_set_stock</span> <span class="p">(</span><span class="n">button</span><span class="p">,</span> <span class="n">gtk_action_get_stock_id</span> <span class="p">(</span><span class="n">action</span><span class="p">));</span>
      <span class="k">else</span> <span class="nf">if</span> <span class="p">(</span><span class="n">gtk_action_get_label</span> <span class="p">(</span><span class="n">action</span><span class="p">))</span>
	<span class="n">foo_bar_set_label</span> <span class="p">(</span><span class="n">button</span><span class="p">,</span> <span class="n">gtk_action_get_label</span> <span class="p">(</span><span class="n">action</span><span class="p">));</span>

      <span class="p">...</span>

    <span class="p">}</span>
<span class="p">}</span>

<span class="k">static</span> <span class="kt">void</span> 
<span class="n">foo_bar_activatable_update</span> <span class="p">(</span><span class="n">GtkActivatable</span>       <span class="o">*</span><span class="n">activatable</span><span class="p">,</span>
			       <span class="n">GtkAction</span>            <span class="o">*</span><span class="n">action</span><span class="p">,</span>
			       <span class="k">const</span> <span class="n">gchar</span>          <span class="o">*</span><span class="n">property_name</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">FooBarPrivate</span> <span class="o">*</span><span class="n">priv</span> <span class="o">=</span> <span class="n">FOO_BAR_GET_PRIVATE</span> <span class="p">(</span><span class="n">activatable</span><span class="p">);</span>

  <span class="k">if</span> <span class="p">(</span><span class="n">strcmp</span> <span class="p">(</span><span class="n">property_name</span><span class="p">,</span> <span class="s">&quot;visible&quot;</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
    <span class="p">{</span>
      <span class="k">if</span> <span class="p">(</span><span class="n">gtk_action_is_visible</span> <span class="p">(</span><span class="n">action</span><span class="p">))</span>
	<span class="n">gtk_widget_show</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">activatable</span><span class="p">));</span>
      <span class="k">else</span>
	<span class="nf">gtk_widget_hide</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">activatable</span><span class="p">));</span>
    <span class="p">}</span>
  <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">strcmp</span> <span class="p">(</span><span class="n">property_name</span><span class="p">,</span> <span class="s">&quot;sensitive&quot;</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
    <span class="n">gtk_widget_set_sensitive</span> <span class="p">(</span><span class="n">GTK_WIDGET</span> <span class="p">(</span><span class="n">activatable</span><span class="p">),</span> <span class="n">gtk_action_is_sensitive</span> <span class="p">(</span><span class="n">action</span><span class="p">));</span>

  <span class="p">...</span>

  <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">priv</span><span class="o">-&gt;</span><span class="n">use_action_appearance</span><span class="p">)</span>
    <span class="k">return</span><span class="p">;</span>

  <span class="k">if</span> <span class="p">(</span><span class="n">strcmp</span> <span class="p">(</span><span class="n">property_name</span><span class="p">,</span> <span class="s">&quot;stock-id&quot;</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
    <span class="n">foo_bar_set_stock</span> <span class="p">(</span><span class="n">button</span><span class="p">,</span> <span class="n">gtk_action_get_stock_id</span> <span class="p">(</span><span class="n">action</span><span class="p">));</span>
  <span class="k">else</span> <span class="nf">if</span> <span class="p">(</span><span class="n">strcmp</span> <span class="p">(</span><span class="n">property_name</span><span class="p">,</span> <span class="s">&quot;label&quot;</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
    <span class="n">foo_bar_set_label</span> <span class="p">(</span><span class="n">button</span><span class="p">,</span> <span class="n">gtk_action_get_label</span> <span class="p">(</span><span class="n">action</span><span class="p">));</span>

  <span class="p">...</span>
<span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="GtkActivatable.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-activatable-do-set-related-action"></a><h3>gtk_activatable_do_set_related_action ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_activatable_do_set_related_action (<em class="parameter"><code><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> *activatable</code></em>,
                                       <em class="parameter"><code><a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> *action</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_activatable_do_set_related_action</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>This is a utility function for <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> implementors.</p>
<p>When implementing <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> you must call this when
handling changes of the <a class="link" href="GtkActivatable.html#GtkActivatable--related-action" title="The “related-action” property"><span class="type">“related-action”</span></a>, and
you must also use this to break references in <span class="type">GObject</span>-&gt;<code class="function">dispose()</code>.</p>
<p>This function adds a reference to the currently set related
action for you, it also makes sure the <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a>-&gt;<code class="function">update()</code>
method is called when the related <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> properties change
and registers to the action’s proxy list.</p>
<div class="blockquote"><blockquote class="blockquote"><p>Be careful to call this before setting the local
copy of the <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> property, since this function uses 
<a class="link" href="GtkActivatable.html#gtk-activatable-get-related-action" title="gtk_activatable_get_related_action ()"><code class="function">gtk_activatable_get_related_action()</code></a> to retrieve the
previous action.</p></blockquote></div>
<div class="refsect3">
<a name="gtk-activatable-do-set-related-action.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>activatable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.16</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-activatable-get-related-action"></a><h3>gtk_activatable_get_related_action ()</h3>
<pre class="programlisting"><a class="link" href="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *
gtk_activatable_get_related_action (<em class="parameter"><code><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> *activatable</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_activatable_get_related_action</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Gets the related <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> for <em class="parameter"><code>activatable</code></em>
.</p>
<div class="refsect3">
<a name="gtk-activatable-get-related-action.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>activatable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-activatable-get-related-action.returns"></a><h4>Returns</h4>
<p>the related <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> if one is set. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.16</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-activatable-get-use-action-appearance"></a><h3>gtk_activatable_get_use_action_appearance ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_activatable_get_use_action_appearance
                               (<em class="parameter"><code><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> *activatable</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_activatable_get_use_action_appearance</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Gets whether this activatable should reset its layout
and appearance when setting the related action or when
the action changes appearance.</p>
<div class="refsect3">
<a name="gtk-activatable-get-use-action-appearance.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>activatable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-activatable-get-use-action-appearance.returns"></a><h4>Returns</h4>
<p> whether <em class="parameter"><code>activatable</code></em>
uses its actions appearance.</p>
</div>
<p class="since">Since: 2.16</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-activatable-sync-action-properties"></a><h3>gtk_activatable_sync_action_properties ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_activatable_sync_action_properties
                               (<em class="parameter"><code><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> *activatable</code></em>,
                                <em class="parameter"><code><a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> *action</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_activatable_sync_action_properties</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>This is called to update the activatable completely, this is called
internally when the <a class="link" href="GtkActivatable.html#GtkActivatable--related-action" title="The “related-action” property"><span class="type">“related-action”</span></a> property is set
or unset and by the implementing class when
<a class="link" href="GtkActivatable.html#GtkActivatable--use-action-appearance" title="The “use-action-appearance” property"><span class="type">“use-action-appearance”</span></a> changes.</p>
<div class="refsect3">
<a name="gtk-activatable-sync-action-properties.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>activatable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>the related <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.16</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-activatable-set-related-action"></a><h3>gtk_activatable_set_related_action ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_activatable_set_related_action (<em class="parameter"><code><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> *activatable</code></em>,
                                    <em class="parameter"><code><a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> *action</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_activatable_set_related_action</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Sets the related action on the <em class="parameter"><code>activatable</code></em>
 object.</p>
<div class="blockquote"><blockquote class="blockquote"><p><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> implementors need to handle the <a class="link" href="GtkActivatable.html#GtkActivatable--related-action" title="The “related-action” property"><span class="type">“related-action”</span></a>
property and call <a class="link" href="GtkActivatable.html#gtk-activatable-do-set-related-action" title="gtk_activatable_do_set_related_action ()"><code class="function">gtk_activatable_do_set_related_action()</code></a> when it changes.</p></blockquote></div>
<div class="refsect3">
<a name="gtk-activatable-set-related-action.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>activatable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.16</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-activatable-set-use-action-appearance"></a><h3>gtk_activatable_set_use_action_appearance ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_activatable_set_use_action_appearance
                               (<em class="parameter"><code><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> *activatable</code></em>,
                                <em class="parameter"><code><span class="type">gboolean</span> use_appearance</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_activatable_set_use_action_appearance</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Sets whether this activatable should reset its layout and appearance
when setting the related action or when the action changes appearance</p>
<div class="blockquote"><blockquote class="blockquote"><p><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> implementors need to handle the
<a class="link" href="GtkActivatable.html#GtkActivatable--use-action-appearance" title="The “use-action-appearance” property"><span class="type">“use-action-appearance”</span></a> property and call
<a class="link" href="GtkActivatable.html#gtk-activatable-sync-action-properties" title="gtk_activatable_sync_action_properties ()"><code class="function">gtk_activatable_sync_action_properties()</code></a> to update <em class="parameter"><code>activatable</code></em>

if needed.</p></blockquote></div>
<div class="refsect3">
<a name="gtk-activatable-set-use-action-appearance.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>activatable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use_appearance</p></td>
<td class="parameter_description"><p>whether to use the actions appearance</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.16</p>
</div>
</div>
<div class="refsect1">
<a name="GtkActivatable.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkActivatable-struct"></a><h3>GtkActivatable</h3>
<pre class="programlisting">typedef struct _GtkActivatable GtkActivatable;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GtkActivatableIface"></a><h3>struct GtkActivatableIface</h3>
<pre class="programlisting">struct GtkActivatableIface {
  /* virtual table */
  void   (* update)                   (GtkActivatable *activatable,
		                       GtkAction      *action,
		                       const gchar    *property_name);
  void   (* sync_action_properties)   (GtkActivatable *activatable,
		                       GtkAction      *action);
};
</pre>
<div class="warning"><p><code class="literal">GtkActivatableIface</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<div class="blockquote"><blockquote class="blockquote"><p>This method can be called with a <code class="literal">NULL</code> action at times.</p></blockquote></div>
<div class="refsect3">
<a name="GtkActivatableIface.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkActivatableIface.update"></a>update</code></em> ()</p></td>
<td class="struct_member_description"><p>Called to update the activatable when its related action’s properties change.
You must check the <a class="link" href="GtkActivatable.html#GtkActivatable--use-action-appearance" title="The “use-action-appearance” property"><span class="type">“use-action-appearance”</span></a> property only apply action
properties that are meant to effect the appearance accordingly.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkActivatableIface.sync-action-properties"></a>sync_action_properties</code></em> ()</p></td>
<td class="struct_member_description"><p>Called to update the activatable completely, this is called internally when
<a class="link" href="GtkActivatable.html#GtkActivatable--related-action" title="The “related-action” property"><span class="type">“related-action”</span></a> property is set or unset and by the implementor when
<a class="link" href="GtkActivatable.html#GtkActivatable--use-action-appearance" title="The “use-action-appearance” property"><span class="type">“use-action-appearance”</span></a> changes.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.16</p>
</div>
</div>
<div class="refsect1">
<a name="GtkActivatable.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkActivatable--related-action"></a><h3>The <code class="literal">“related-action”</code> property</h3>
<pre class="programlisting">  “related-action”           <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> *</pre>
<p>The action that this activatable will activate and receive
updates from for various states and possibly appearance.</p>
<div class="blockquote"><blockquote class="blockquote"><p><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> implementors need to handle the this property and
call <a class="link" href="GtkActivatable.html#gtk-activatable-do-set-related-action" title="gtk_activatable_do_set_related_action ()"><code class="function">gtk_activatable_do_set_related_action()</code></a> when it changes.</p></blockquote></div>
<div class="warning"><p><code class="literal">GtkActivatable:related-action</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Owner: GtkActivatable</p>
<p>Flags: Read / Write</p>
<p class="since">Since: 2.16</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkActivatable--use-action-appearance"></a><h3>The <code class="literal">“use-action-appearance”</code> property</h3>
<pre class="programlisting">  “use-action-appearance”    <span class="type">gboolean</span></pre>
<p>Whether this activatable should reset its layout
and appearance when setting the related action or when
the action changes appearance.</p>
<p>See the <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a> documentation directly to find which properties
should be ignored by the <a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> when this property is <code class="literal">FALSE</code>.</p>
<div class="blockquote"><blockquote class="blockquote"><p><a class="link" href="GtkActivatable.html" title="GtkActivatable"><span class="type">GtkActivatable</span></a> implementors need to handle this property
and call <a class="link" href="GtkActivatable.html#gtk-activatable-sync-action-properties" title="gtk_activatable_sync_action_properties ()"><code class="function">gtk_activatable_sync_action_properties()</code></a> on the activatable
widget when it changes.</p></blockquote></div>
<div class="warning"><p><code class="literal">GtkActivatable:use-action-appearance</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Owner: GtkActivatable</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
<p class="since">Since: 2.16</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>